/* 
  Api:是一个通用的,里面有  data code msg
  dshData : 是表格通用的 里面有 list page  pageSize total
  dshList : 表格数据类型
  dshDataHeader : 表头数据类型
  selectObject : 动态表格和表单的数据
*/

import { Api, dshData, dshList, dshDataHeader, selectObject, treeTableList, treeDataListOne } from './tableType'
import moment from 'moment'
// 表格数据
export const tabsTableDsh = ref<Api<dshData<dshList[]>>>({
  code: 0,
  data: {
    list: [
      {
        ordersStatus: 'dsh',
        orderNumber: '待审核订单号1',
        processStatus: '待审核进程状态1',
        processStatusList: [
          { text: '下单', id: 1, isShow: true },
          { text: '配舱', id: 2, isShow: true },
          { text: '装箱', id: 3, isShow: true },
          { text: '报关', id: 4, isShow: false },
          { text: '清关', id: 5, isShow: false }
        ],
        creationDate: moment(new Date()).format('YYYY-MM-DD'),
        warehouseNumber: '待审核仓库号1',
        unit: '待审核单位1',
        number: '待审核编号1',
        id: 1
      },

      {
        ordersStatus: 'dsh',
        orderNumber: '待审核订单号2',
        processStatus: '待审核进程状态2',
        processStatusList: [],
        creationDate: moment(new Date()).format('YYYY-MM-DD'),
        warehouseNumber: '待审核仓库号2',
        unit: '待审核单位2',
        number: '待审核编号2',
        id: 2
      },
      {
        // '已配舱', '已下单', '已装箱', '已清关', '已报关'
        ordersStatus: 'jxz',
        orderNumber: '进行中订单号1',
        processStatus: '已配舱',
        processStatusList: [
          { text: '下单', id: 1, isShow: false },
          { text: '配舱', id: 2, isShow: true },
          { text: '装箱', id: 3, isShow: true },
          { text: '报关', id: 4, isShow: false },
          { text: '清关', id: 5, isShow: true }
        ],
        percentage: 60,
        creationDate: moment(new Date()).format('YYYY-MM-DD'),
        warehouseNumber: '进行中仓库号1',
        unit: '进行中单位1',
        number: '进行中编号1',
        id: 3
      },
      {
        ordersStatus: 'jxz',
        orderNumber: '进行中订单号2',
        processStatus: '已下单',
        processStatusList: [
          { text: '下单', id: 1, isShow: true },
          { text: '配舱', id: 2, isShow: false },
          { text: '装箱', id: 3, isShow: true },
          { text: '报关', id: 4, isShow: true },
          { text: '清关', id: 5, isShow: true }
        ],
        percentage: 80,
        creationDate: moment(new Date()).format('YYYY-MM-DD'),
        warehouseNumber: '进行中仓库号1',
        unit: '进行中单位1',
        number: '进行中编号1',
        id: 4
      },
      {
        ordersStatus: 'jxz',
        orderNumber: '进行中订单号3',
        processStatus: '已装箱',
        processStatusList: [
          { text: '下单', id: 1, isShow: true },
          { text: '配舱', id: 2, isShow: true },
          { text: '装箱', id: 3, isShow: true },
          { text: '报关', id: 4, isShow: true },
          { text: '清关', id: 5, isShow: true }
        ],
        percentage: 100,
        creationDate: moment(new Date()).format('YYYY-MM-DD'),
        warehouseNumber: '进行中仓库号1',
        unit: '进行中单位1',
        number: '进行中编号1',
        id: 5
      },
      {
        ordersStatus: 'jxz',
        orderNumber: '进行中订单号4',
        processStatus: '已清关',
        processStatusList: [
          { text: '下单', id: 1, isShow: true },
          { text: '配舱', id: 2, isShow: true },
          { text: '装箱', id: 3, isShow: false },
          { text: '报关', id: 4, isShow: false },
          { text: '清关', id: 5, isShow: false }
        ],
        percentage: 40,
        creationDate: moment(new Date()).format('YYYY-MM-DD'),
        warehouseNumber: '进行中仓库号1',
        unit: '进行中单位1',
        number: '进行中编号1',
        id: 6
      },
      {
        ordersStatus: 'jxz',
        orderNumber: '进行中订单号5',
        processStatus: '已报关',
        processStatusList: [
          { text: '下单', id: 1, isShow: false },
          { text: '配舱', id: 2, isShow: true },
          { text: '装箱', id: 3, isShow: false },
          { text: '报关', id: 4, isShow: false },
          { text: '清关', id: 5, isShow: false }
        ],
        percentage: 20,
        creationDate: moment(new Date()).format('YYYY-MM-DD'),
        warehouseNumber: '进行中仓库号2',
        unit: '进行中单位2',
        number: '进行中编号2',
        id: 7
      },

      {
        ordersStatus: 'ygd',
        orderNumber: '已归档订单号2',
        processStatus: '已归档进程状态1',
        processStatusList: [
          { text: '下单', id: 1, isShow: true },
          { text: '配舱', id: 2, isShow: true },
          { text: '装箱', id: 3, isShow: true },
          { text: '报关', id: 4, isShow: false },
          { text: '清关', id: 5, isShow: false }
        ],
        creationDate: moment(new Date()).format('YYYY-MM-DD'),
        warehouseNumber: '已归档仓库号1',
        unit: '已归档单位1',
        number: '已归档编号1',
        id: 8
      }
    ],
    page: 1,
    pageSize: 10,
    total: 8
  },
  msg: '成功'
})
// dsh表头
export const dshtabsTableDshHeard = ref<dshDataHeader[]>([
  { lable: '订单号', property: 'orderNumber', isShow: true },
  { lable: '进程状态', property: 'processStatus', isShow: true },
  { lable: '创建日期', property: 'creationDate', isShow: true },
  { lable: '仓号', property: 'warehouseNumber', isShow: true },
  { lable: '单位', property: 'unit', isShow: true },
  { lable: '编号', property: 'number', isShow: true }
])
// jxz表头
export const jxztabsTableDshHeard = ref<dshDataHeader[]>([
  { lable: '订单号', property: 'orderNumber', isShow: true },
  { lable: '进程状态', property: 'processStatus', isShow: true },
  { lable: '仓号', property: 'warehouseNumber', isShow: true },
  { lable: '单位', property: 'unit', isShow: true },
  { lable: '编号', property: 'number', isShow: true }
])
// ygd表头
export const ygdtabsTableDshHeard = ref<dshDataHeader[]>([
  { lable: '订单号', property: 'orderNumber', isShow: true },
  { lable: '单位', property: 'unit', isShow: true },
  { lable: '编号', property: 'number', isShow: true },
  { lable: '创建日期', property: 'creationDate', isShow: true }
])

// 表单里的数据
export const selectItem = ref<selectObject>({
  typeOfContainerGoods: [
    {
      id: 1,
      name: 'Radio 1',
      roleType: '1'
    },
    {
      id: 2,
      name: '点击第一步',
      roleType: '2'
    }
  ],
  businessType: [
    {
      id: 1,
      name: '点击第二步',
      roleType: '1'
    },
    {
      id: 2,
      name: 'Radio 1',
      roleType: '2'
    },
    {
      id: 3,
      name: 'Radio 2',
      roleType: '3'
    }
  ],
  ordertype: [
    {
      id: 1,
      name: 'Radio 1',
      roleType: '1'
    },
    {
      id: 2,
      name: 'Radio 2',
      roleType: '2'
    },

    {
      id: 3,
      name: '点击第三步',
      roleType: '3'
    }
  ]
})

// 树形筛选数据

export const treeTableDataList = ref<Api<treeTableList[]>>({
  code: 200,
  data: [
    {
      id: '1',
      name: '华东分部',
      pidname: '华东分部',
      children: [
        {
          id: '11',
          name: '研发部',
          pidname: '华东分部'
        },
        {
          id: '12',
          name: '市场部',
          pidname: '华东分部'
        },
        {
          id: '13',
          name: '商务部',
          pidname: '华东分部'
        },
        {
          id: '14',
          name: '财务部',
          pidname: '华东分部'
        }
      ]
    },
    {
      id: '2',
      name: '华南分部',
      pidname: '华南分部',
      children: [
        {
          id: '21',
          name: '研发部1',
          pidname: '华南分部'
        },
        {
          id: '22',
          name: '市场部2',
          pidname: '华南分部'
        },
        {
          id: '23',
          name: '商务部3',
          pidname: '华南分部'
        },
        {
          id: '24',
          name: '财务部4',
          pidname: '华南分部'
        }
      ]
    },
    {
      id: '3',
      name: '西北分部',
      pidname: '西北分部',
      children: [
        {
          id: '31',
          name: '研发部',
          pidname: '西北分部'
        },
        {
          id: '32',
          name: '市场部',
          pidname: '西北分部'
        },
        {
          id: '33',
          name: '商务部',
          pidname: '西北分部'
        },
        {
          id: '34',
          name: '财务部',
          pidname: '西北分部'
        }
      ]
    }
  ],
  msg: '成功'
})

/**
 * @param  treeTable 通过树形结构查询表单数据
 * @param   信息:
 * */
export const treeTable = ref<Api<treeDataListOne>>({
  code: 200,
  msg: '成功',
  data: {
    datalist: [
      {
        id: '20022821822631609255',
        username: '叶静',
        area: '华东分部',
        department: '研发部',
        gender: 2,
        user: {
          detail: {
            age: 21
          }
        },
        idCard: '20022821822631609255',
        email: 'o.euicugn@iylkv.sc',
        address: '湖北省 黄石市',
        createTime: '1986-08-05 21:47:50',
        status: 0,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110015.jpg'
      },
      {
        id: '72164844901621848856',
        username: '苏秀兰',
        area: '华东分部',
        department: '市场部',
        gender: 1,
        user: {
          detail: {
            age: 18
          }
        },
        idCard: '72164844901621848856',
        email: 'g.xfh@qyppqylb.pt',
        address: '广西壮族自治区 河池市',
        createTime: '1970-12-28 19:35:19',
        status: 1,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110015.jpg'
      },
      {
        id: '21108385753884934191',
        username: '叶桂英',
        area: '华东分部',
        department: '商务部',
        gender: 2,
        user: {
          detail: {
            age: 22
          }
        },
        idCard: '21108385753884934191',
        email: 'k.dycrrhhiu@khwptvpjf.re',
        address: '四川省 资阳市',
        createTime: '2006-11-21 00:16:45',
        status: 0,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110032.jpg'
      },
      {
        id: '01984091881782754118',
        username: '雷刚',
        area: '华东分部',
        department: '财务部',
        gender: 1,
        user: {
          detail: {
            age: 17
          }
        },
        idCard: '01984091881782754118',
        email: 'u.dkfvmv@mvbs.mr',
        address: '湖南省 岳阳市',
        createTime: '1981-11-18 05:38:51',
        status: 0,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110012.jpg'
      },
      {
        id: '74139966682444114894',
        username: '钱刚',
        area: '华南分部',
        department: '研发部1',
        gender: 1,
        user: {
          detail: {
            age: 25
          }
        },
        idCard: '74139966682444114894',
        email: 'g.exvroktyh@biqdxdj.in',
        address: '浙江省 温州市',
        createTime: '1993-01-16 16:20:52',
        status: 1,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110032.jpg'
      },
      {
        id: '87242352502266424129',
        username: '谢明',
        area: '华南分部',
        department: '市场部2',
        gender: 1,
        user: {
          detail: {
            age: 25
          }
        },
        idCard: '87242352502266424129',
        email: 'y.zlmy@mrugv.cg',
        address: '内蒙古自治区 乌兰察布市',
        createTime: '2009-06-27 18:11:43',
        status: 1,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110015.jpg'
      },
      {
        id: '14468062382731432577',
        username: '易平',
        area: '华南分部',
        department: '商务部3',
        gender: 2,
        user: {
          detail: {
            age: 22
          }
        },
        idCard: '14468062382731432577',
        email: 'o.iqqypn@nyhqcbdlx.hk',
        address: '湖北省 荆门市',
        createTime: '1970-05-27 15:19:09',
        status: 1,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110012.jpg'
      },
      {
        id: '23586857360541134961',
        username: '邵秀英',
        area: '华南分部',
        department: '财务部4',
        gender: 1,
        user: {
          detail: {
            age: 23
          }
        },
        idCard: '23586857360541134961',
        email: 'b.seyddadl@utlpsyeth.cv',
        address: '吉林省 吉林市',
        createTime: '1979-11-06 04:00:04',
        status: 0,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110015.jpg'
      },
      {
        id: '73876688816588137972',
        username: '程艳',
        area: '西北分部',
        department: '研发部',
        gender: 1,
        user: {
          detail: {
            age: 19
          }
        },
        idCard: '73876688816588137972',
        email: 'f.lbewroomgr@vjydafws.hr',
        address: '海南省 三沙市',
        createTime: '1987-12-19 04:50:05',
        status: 0,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110032.jpg'
      },
      {
        id: '88246327538568856599',
        username: '文敏',
        area: '西北分部',
        department: '市场部',
        gender: 2,
        user: {
          detail: {
            age: 19
          }
        },
        idCard: '88246327538568856599',
        email: 'm.mmyssmmrw@wkg.li',
        address: '台湾 澎湖县',
        createTime: '1983-01-08 22:39:07',
        status: 0,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110012.jpg'
      },
      {
        id: '882463275385688565991',
        username: '文敏',
        area: '西北分部',
        department: '商务部',
        gender: 2,
        user: {
          detail: {
            age: 19
          }
        },
        idCard: '88246327538568856599',
        email: 'm.mmyssmmrw@wkg.li',
        address: '台湾 澎湖县',
        createTime: '1983-01-08 22:39:07',
        status: 0,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110012.jpg'
      },
      {
        id: '8824632753856885659911',
        username: '文敏',
        area: '西北分部',
        department: '财务部',
        gender: 2,
        user: {
          detail: {
            age: 19
          }
        },
        idCard: '88246327538568856599',
        email: 'm.mmyssmmrw@wkg.li',
        address: '台湾 澎湖县',
        createTime: '1983-01-08 22:39:07',
        status: 0,
        avatar: 'https://iamge-1259297738.cos.ap-chengdu.myqcloud.com/img/20220728110012.jpg'
      }
    ],
    pageNum: 1,
    pageSize: 10,
    total: 2000
  }
})
